class TestWebpackPlugin {
  constructor(doneCallback, failCallback) {
    this.doneCallback = doneCallback;
    this.failCallback = failCallback;
  }

  apply(compiler) {
    compiler.hooks.done.tap('TestWebpackPlugin', (stats) => {
      this.doneCallback(stats);
    });

    compiler.hooks.failed.tap('TestWebpackPlugin', (stats) => {
      this.failCallback(stats);
    })
  }
}

module.exports = TestWebpackPlugin;